<?php $status = array('Schwebend'   => 'blue',
                      'Festgelegt'  => 'cyan',
                      'Geschlossen' => 'black',
                      'Gebucht'     => 'orange',
                      'Storniert'   => 'red',
                      'Fakturiert'  => 'green',
                      'test1'       => 'red',
                      'test2'       => 'orange',
                     );
?>

<?php if($measures):?>
<?php $this->load->helper('date'); ?>

<table class="table table-condensed table-striped">
    <tr><th>#</th><th>Fachthema</th><th>Teilnehmer</th><th>Termin</th><th>Ort</th><th>Status</th></tr>
    <?php foreach($measures as $measure): ?>
    <tr><td><?php echo $measure->id ;?></td>
        <td><?php echo anchor('/measure/details/'.$measure->id, $measure->course()->title) ;?></td>
        <td><?php echo $amount_participants ;?></td>
        <td><?php echo date("d.m.Y - H:i:s",strtotime($measure->appointment_to)) ;?></td>
        <td><?php echo $measure->place()->city ;?></td>
        <td><div rel="tooltip" title="<?php echo $measure->trainingstatus()->description;?>" class="<?php echo $status[$measure->trainingstatus()->name]; ?>" style="font-size: smaller; text-align: center; cursor: help"><?php echo $measure->trainingstatus()->name ;?></div></td>
    </tr>
    <?php endforeach; ?>
</table>

<?php else:?>

<div class="alert alert-warning">Keine Massnahmen verfügbar</div>

<?php endif; ?>